home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr11
/
gedvw105.zip
/
INDENT.PRG
< prev
next >
Wrap
Text File
|
1995-03-05
|
918b
|
59 lines
*
* This will indent all GEDCOM lines 2 spaces * level, using the
* argument as the output file. If there is no argument, it will
* create NEW.GED.
*
* for GEDView 1.05
* michael@genealogy.emcee.com - 3 Mar 1995
*
set bell off
remember record
compare $ARG
ifequal
goto set-default-name
set #outfile $ARG
save $OUTFILE ""
go 1
:the-top
show creating $OUTFILE ....
get line
iffailed
goto the-end
:do-record
set #counter -1
gosub check-level
append $OUTFILE $LINE
append $OUTFILE "\J"
get next line
ifequal
goto do-record
next
iffailed
goto the-end
goto the-top
:the-end
go record
set bell on
end
:check-level
add 1 #counter
ifescape
goto the-end
compare $FIELD1 $COUNTER
iffailed
goto check-level
do $COUNTER
append $OUTFILE " "
repeat
return
:set-default-name
set #outfile new.ged
save $OUTFILE
go 1
goto the-top